#include <stdio.h>

int main() {
    int year, month, days;

    printf("Please input year and month:");
    scanf("%d,%d", &year, &month);

    // 检查输入月份是否合法
    if (month < 1 || month > 12) {
        printf("Input error.\n");
        return 0;
    }

    // 根据月份计算天数
    switch (month) {
        case 1: case 3: case 5: case 7: case 8: case 10: case 12:
            days = 31;
            break;
        case 4: case 6: case 9: case 11:
            days = 30;
            break;
        case 2:
            // 判断是否为闰年
            if ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))
                days = 29;
            else
                days = 28;
            break;
    }

    printf("%d days\n", days);

    return 0;
}
